<?php
if(!defined('DCS_ROOT')) {exit('Access Denied');}

class reviewModel {

	var $DB;

	function reviewModel ( $DB ){
		$this->DB = $DB;
	}

	function getMovie($id){
		$sql = "SELECT * FROM movie WHERE id = '$id' ";
		$this->DB->query($sql);
		return $this->DB->fetchRow();	
	}

	function getReview($id){
		$sql = "SELECT * FROM movie_review WHERE id = '$id' ";
		$this->DB->query($sql);
		return $this->DB->fetchRow();	
	}

	function getUser($uid){
		$sql = "SELECT uid,username,avatars FROM member WHERE uid = '$uid' ";
		$this->DB->query($sql);
		return $this->DB->fetchRow();	
	}
	function getMembers($uids){
		$sql = "SELECT uid,username,avatars FROM member WHERE uid IN($uids) ";
		$this->DB->query($sql);
		return $this->DB->fetchAll();	
	}


}
?>
